import request from '@/utils/request'


//获取PC用户列表
export function getAccountTable(data) {
	return request({
		url: '/pc/system/pc_user/5_page_find_all',
		method: 'post',
		formData:data
	})
}

//获取WX用户列表
export function getWxAccountTable(data) {
	return request({
		url: '/pc/system/pc_user/5_page_find_all_wx_user',
		method: 'post',
		formData:data
	})
}

//获取APP用户列表
export function getAppAccountTable(data) {
	return request({
		url: '/pc/system/pc_user/5_page_find_all_app_user',
		method: 'post',
		formData:data
	})
}

//用户PC新增
export function accountNewAdd(data) {
	return request({
		url:"/pc/system/pc_user/1_insert",
		method:'post',
		json:data
	})
}

//用户WX新增
export function accountWxNewAdd(data) {
	return request({
		url:"/pc/system/pc_user/1_insert_wx_user",
		method:'post',
		json:data
	})
}

//用户APP新增
export function accountAppNewAdd(data) {
	return request({
		url:"/pc/system/pc_user/1_insert_app_user",
		method:'post',
		json:data
	})
}

//用户编辑
export function accountEdite(data) {
	return request({
		url:"/pc/system/pc_user/2_update",
		method:'post',
		json:data
	})
}

//用户WX编辑
export function accountWxEdite(data) {
	return request({
		url:"/pc/system/pc_user/2_update_wx_user",
		method:'post',
		json:data
	})
}

//用户WX编辑
export function accountAppEdite(data) {
	return request({
		url:"/pc/system/pc_user/2_update_app_user",
		method:'post',
		json:data
	})
}

//用户(批量)删除
export function accountDelete(data) {
	return request({
		url:"/pc/system/pc_user/3_delete_by_id",
		method:'post',
		formData:data
	})
}

//角色列表
export function getRolesData(data) {
	return request({
		url:"/pc/system/pc_role/5_page_find_all",
		method:'post',
		formData:data
	})
}

//根据账户ID获取拥有角色
export function getAccountRoles(data) {
	return request({
		url:"/pc/system/pc_user/7_get_role_list_by_user_id",
		method:'post',
		formData:data
	})
}

//根据账户ID赋予角色
export function saveAccountRoles(data) {
	return request({
		url:"/pc/system/pc_user/8_save_role_list_by_user_id",
		method:'post',
		json:data
	})
}

//启停（批量）账户
export function SaveAccountState(data) {
	return request({
		url:"/pc/system/pc_user/10_stop_user",
		method:'post',
		formData:data
	})
}

//用户PC详情
export function getAccountDetail(data) {
	return request({
		url:"/pc/system/pc_user/4_find_by_id",
		method:'post',
		formData:data
	})
}

//用户WX详情
export function getWxAccountDetail(data) {
	return request({
		url:"/pc/system/pc_user/4_find_by_id_wx",
		method:'post',
		formData:data
	})
}

//用户APP详情
export function getAppAccountDetail(data) {
	return request({
		url:"/pc/system/pc_user/4_find_by_id_app",
		method:'post',
		formData:data
	})
}

//获取区域权限
export function getOrganizationDistrict(data) {
	return request({
		url:"/pc/system/pc_organization/6_get_region_list_by_parent_id",
		method:'post',
		formData:data
	})
}

//查询企业ID列表
export function getEnterpriseData(data) {
	return request({
		url:"/pc/system/app_enterprise/5_page_find_all",
		method:'post',
		json:data
	})
}

//查询机构列表
export function getOrganizationList(data) {
	return request({
		url:"/pc/system/pc_organization/5_blurry_find_all",
		method:'post',
		formData:data
	})
}


